//
//  AKToolKit.h
//  AKPZ
//
//  Created by Lexi on 16-3-14.
//  Copyright (c) 2016年 aikangpeizhen. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface AKToolKit : NSObject

//错误文本提示
+ (void)showErrorMessage:(NSError *)error;

//工具
+ (BOOL)objectIsNull:(NSObject *)obj;
+ (BOOL)objectIsBlank:(NSObject *)obj;
+ (BOOL)stringIsEmpty:(NSString *)aString shouldCleanWhiteSpace:(BOOL)cleanWhileSpace;//验证字符串非空(是否自动清除左右空格)
+ (void)postNotify:(NSString*)type object:(id)obj;
+ (NSString *)createUuidString;
+ (NSString *)md5HexDigest:(NSString *)data;
+ (NSString *)replacePhoneCharacters:(NSString *)originalString;//去掉手机号码中的特殊字符
+ (UIColor *)colorWithHexString:(NSString *)stringToConvert;//#FFFFFF
+ (NSString *)getFilePath:(NSString *)fileName; //返回沙盒+fileName文件夹路径名称
+ (BOOL)createFile:(NSString *)fileName;    //在沙盒中创建fileName文件夹

//图片处理
+ (NSString*)saveImage:(UIImage *)image toDocumentWithName:(NSString *)imageName fileType:(NSInteger)fileType;//fileType=99则不做处理, 其他type需要裁减
+ (UIImage *)getImageFromDocumentWithName:(NSString *)imageName;
+ (void)deleteImageFromDocumentsWithName:(NSString *)imageName;
+ (UIImage*)scaleImage:(UIImage*)image toSize:(CGSize)newSize;
+ (UIImage *)compressedImage:(UIImage*)image toSize:(CGSize)newSize;
+ (UIImage *)image:(UIImage *)image rotation:(UIImageOrientation)orientation;
+ (UIImage *)resizeImage:(UIImage *)orginalImage resizeSize:(CGSize)size;
+ (UIImage *)circleImage:(UIImage *)image withParam:(CGFloat)inset; // 图片剪切成圆形
+ (UIImage *)circleImage:(UIImage *)image;  // 图片剪切成圆形

//接口
+ (NSString *)createUrl:(NSString *)url;

//验证
+ (BOOL)isMobileNumber:(NSString *)mobileNum;
+ (BOOL)isPhoneNumber:(NSString *)phoneNum;
+ (BOOL)isCorrectPwd:(NSString *)pwd;   //只能是数字, 字母和某些特殊符号

//中英文字数(英文为0.5, 中文为1的长度)
+ (int)wordCount:(NSString *)s;

@end
